﻿using System;

namespace RIFF
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            if (args.Length == 0)
            {
                Console.WriteLine("Usage: RIFF <file name>");
            }
            else
            {
                var riff = Chunk.Riff.Open(args[0]);
                Console.WriteLine($"File Type: {riff.FormType}");
                Console.WriteLine($"Data Size: {riff.GetDataChunk().Size}");
                var fmt = riff.GetFormatChunk();
                Console.WriteLine($"FormatTag: {fmt.FormatTag}");
                Console.WriteLine($"Channels: {fmt.Channels}");
                Console.WriteLine($"Samples Per Second: {fmt.SamplesPerSecond}");
                Console.WriteLine($"Format: {fmt.GetFormat()}");
            }
        }
    }
}
